home *** CD-ROM | disk | FTP | other *** search
/ PC Format (UK) 188 / 01-04 PC Format 188 [2006-06] DVD side 1_.iso / DiscContents / Workshops / Workshops_Games / Gamer's Internet Tunnel / Git-099b4.exe / {app} / Age of Mythology - Titans.git next >
Text File  |  2004-12-17  |  4KB  |  118 lines

  1. # GIT Wizard script for Age of Mythology - Titans
  2.  
  3. # Base common settings
  4. setvar sockets ""
  5. setvar ports "2299-2300 : AoM:Titans"
  6. setvar options OPT_FRAME_ETH2
  7. addflag options OPT_IPV4_SRCP
  8. addflag options OPT_IPV4_NORT
  9. addflag options OPT_OTHER_ARP
  10. addflag options OPT_COMP_ZLIB
  11. setvar packets 0
  12. setvar protos PROTO_UDP
  13.  
  14. setvar heading "Important Information"
  15. setvar subheading "LAN configuration"
  16. addline control "label||In order for Age of Mythology - Titans to work with GIT, every LAN must be on the subnet and use the same subnet mask."
  17. appendstring control "  No computers or routers can share an IP address, and one computer on each LAN must run GIT and be able to map ports to it."
  18. appendstring control "  For example, if your LAN uses 192.168.0.1 for its router and your computers are 192.168.0.2 and 192.168.0.3, the other LAN must not use 192.168.0.1 through 192.168.0.3 at all."
  19. appendstring control "  The other LAN must be on the same 192.168.0.x subnet though, so the IP address of the router must be changed to something like 192.168.0.11 and the computers on that LAN can be numbered with 192.168.0.12 and 192.168.0.13."
  20. appendstring control "  If no LANs use NAT and every computer has a real IP address, you do not need GIT, since you can use the direct IP option in the game."
  21. appendstring control "  If any one LAN must use NAT, you will have to configure every LAN to use NAT with the same subnet and use GIT."
  22. appendstring control "  Beyond configuring each LAN as stated above, the only other thing you will need is the external IP address of each LAN."
  23. appendstring control "|15"
  24. showpage
  25.  
  26. # Page Asking for IP + Ask for a list of all others
  27. loadvar externalhostname
  28. loadvar servhostlist
  29. removeblanklines servhostlist
  30. sortlines servhostlist
  31. setvar heading "Host/IP List"
  32. setvar subheading "Information to provide to other LANs."
  33. addline control "label||What is your external hostname or IP address?"
  34. addline control "text1|externalhostname||4"
  35. addline control "label||You must provide this information to the person running GIT on each LAN now."
  36. addline control "space|||2"
  37. addline control "textm|servhostlist|Enter the hostname or IP each other person provides, one per line, including your own:|8"
  38. addline control "label||Everybody running GIT must have the all of the same hostnames or IPs listed here."
  39. showpage
  40. savevar externalhostname
  41. removeblanklines servhostlist
  42. sortlines servhostlist
  43. savevar servhostlist
  44.  
  45. setvar myhost externalhostname
  46.  
  47. # Must have at least two listed
  48. numlines numhosts servhostlist 
  49. if numhosts < 2
  50.     cancel "You must list at least your own host and one other."
  51. endif
  52.  
  53. # Figure out where in the list of hosts is ourself
  54. setvar myhostnum -1
  55. setvar i 0
  56. while i < numhosts
  57.     getline host servhostlist i
  58.     if host = myhost
  59.         setvar myhostnum i
  60.     endif
  61.     math i i + 1
  62. endwhile
  63.  
  64. # Make sure they listed themselves
  65. if myhostnum < 0
  66.     cancel "Your own hostname or IP was not found in the list."
  67. endif
  68.  
  69. # Loop through all the hosts and assign a port to each combination
  70. # Save all the ports/connections that involve ourself
  71. setvar port 213
  72. setvar hosts ""
  73. setvar portlist ""
  74. setvar i 0
  75. while i < numhosts
  76.     setvar j i
  77.     math j j + 1
  78.     while j < numhosts
  79.         setvar host ""
  80.         if i = myhostnum
  81.             getline host servhostlist j
  82.         endif
  83.         if j = myhostnum
  84.             getline host servhostlist i
  85.         endif
  86.         if host != ""
  87.             appendstring host ":"
  88.             appendstring host port
  89.             appendstring host METH_UDP
  90.             addline hosts host
  91.             addline portlist port
  92.         endif
  93.         math j j + 1
  94.         math port port + 1
  95.     endwhile
  96.     math i i + 1
  97. endwhile
  98.  
  99. # Show a reminder page listing ports to map
  100. setvar heading "Reminder"
  101. setvar subheading "Ports to map"
  102. # Create a nice string out of the list of ports
  103. removeblanklines portlist
  104. numlines i portlist
  105. if i > 1
  106.     math i i - 1
  107.     getline port portlist i
  108.     prependstring port "and "
  109.     setline portlist i port
  110. endif
  111. joinlines portlist ", "
  112. addline control "label||Reminder: You must map port "
  113. appendstring control portlist
  114. appendstring control " from "
  115. appendstring control externalhostname
  116. appendstring control " to the computer running GIT.|2"
  117. showpage
  118.